projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0d665fd
)
menubutton: don't dereference NULL GdkEvent
author
Cosimo Cecchi
<cosimoc@gnome.org>
Fri, 29 Jun 2012 22:30:53 +0000
(18:30 -0400)
committer
Cosimo Cecchi
<cosimoc@gnome.org>
Fri, 29 Jun 2012 22:30:53 +0000
(18:30 -0400)
Since we explictly call popup_menu with NULL when it's
keyboard-activated, we need to be careful and not access event->device
without checking for event != NULL before.
gtk/gtkmenubutton.c
patch
|
blob
|
history
diff --git
a/gtk/gtkmenubutton.c
b/gtk/gtkmenubutton.c
index 4c1a2f1efb78f78f9b6153b45da634e60ad5c9ea..63bea8c824d86acde5b20f405cf6123f8052d391 100644
(file)
--- a/
gtk/gtkmenubutton.c
+++ b/
gtk/gtkmenubutton.c
@@
-307,7
+307,9
@@
popup_menu (GtkMenuButton *menu_button,
break;
}
- gtk_menu_popup_for_device (GTK_MENU (priv->menu), event->device, NULL, NULL,
+ gtk_menu_popup_for_device (GTK_MENU (priv->menu),
+ event ? event->device : NULL,
+ NULL, NULL,
func,
GTK_WIDGET (menu_button),
NULL,